﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Configuration;

namespace ErrorLog
{
    internal class ErrorLog
    {
        public ErrorLog()
        {
        }

        internal ILog ErrorLogFactory()
        {
            string logType = ConfigurationSettings.AppSettings["ErrorLogDestination"];

            ILog logObject = null;

            if (logType.Equals("File"))
            {
                logObject = new LogToFile();
            }
            else
            {
                // TODO : once you implement the db, change this to LogToDB()
                logObject = new LogToDB();
               
            }
            return logObject;
        }
    }
}
